using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsActionGroup : GeneratedMessageLite<SnsActionGroup, SnsActionGroup.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsActionGroup, SnsActionGroup.Builder>
		{
			private bool resultIsReadOnly;
			private SnsActionGroup result;
			protected override SnsActionGroup.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsActionGroup MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsActionGroup DefaultInstanceForType
			{
				get
				{
					return SnsActionGroup.DefaultInstance;
				}
			}
			public ulong Id
			{
				get
				{
					return this.result.Id;
				}
				set
				{
					this.SetId(value);
				}
			}
			public ulong ParentId
			{
				get
				{
					return this.result.ParentId;
				}
				set
				{
					this.SetParentId(value);
				}
			}
			public SnsAction CurrentAction
			{
				get
				{
					return this.result.CurrentAction;
				}
				set
				{
					this.SetCurrentAction(value);
				}
			}
			public SnsAction ReferAction
			{
				get
				{
					return this.result.ReferAction;
				}
				set
				{
					this.SetReferAction(value);
				}
			}
			public Builder()
			{
				this.result = SnsActionGroup.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsActionGroup cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsActionGroup PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsActionGroup other = this.result;
					this.result = new SnsActionGroup();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsActionGroup.Builder Clear()
			{
				this.result = SnsActionGroup.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsActionGroup.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsActionGroup.Builder(this.result);
				}
				return new SnsActionGroup.Builder().MergeFrom(this.result);
			}
			public override SnsActionGroup BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsActionGroup.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsActionGroup)
				{
					return this.MergeFrom((SnsActionGroup)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsActionGroup.Builder MergeFrom(SnsActionGroup other)
			{
				return this;
			}
			public override SnsActionGroup.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsActionGroup.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsActionGroup._snsActionGroupFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsActionGroup._snsActionGroupFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 8u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasId = input.ReadUInt64(ref this.result.id_);
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasParentId = input.ReadUInt64(ref this.result.parentId_);
							continue;
						}
						if (num3 == 26u)
						{
							SnsAction.Builder builder = SnsAction.CreateBuilder();
							if (this.result.hasCurrentAction)
							{
								builder.MergeFrom(this.CurrentAction);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.CurrentAction = builder.BuildPartial();
							continue;
						}
						if (num3 == 34u)
						{
							SnsAction.Builder builder2 = SnsAction.CreateBuilder();
							if (this.result.hasReferAction)
							{
								builder2.MergeFrom(this.ReferAction);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.ReferAction = builder2.BuildPartial();
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SnsActionGroup.Builder SetId(ulong value)
			{
				this.PrepareBuilder();
				this.result.hasId = true;
				this.result.id_ = value;
				return this;
			}
			public SnsActionGroup.Builder ClearId()
			{
				this.PrepareBuilder();
				this.result.hasId = false;
				this.result.id_ = 0uL;
				return this;
			}
			public SnsActionGroup.Builder SetParentId(ulong value)
			{
				this.PrepareBuilder();
				this.result.hasParentId = true;
				this.result.parentId_ = value;
				return this;
			}
			public SnsActionGroup.Builder ClearParentId()
			{
				this.PrepareBuilder();
				this.result.hasParentId = false;
				this.result.parentId_ = 0uL;
				return this;
			}
			public SnsActionGroup.Builder SetCurrentAction(SnsAction value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasCurrentAction = true;
				this.result.currentAction_ = value;
				return this;
			}
			public SnsActionGroup.Builder SetCurrentAction(SnsAction.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasCurrentAction = true;
				this.result.currentAction_ = builderForValue.Build();
				return this;
			}
			public SnsActionGroup.Builder MergeCurrentAction(SnsAction value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasCurrentAction && this.result.currentAction_ != SnsAction.DefaultInstance)
				{
					this.result.currentAction_ = SnsAction.CreateBuilder(this.result.currentAction_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.currentAction_ = value;
				}
				this.result.hasCurrentAction = true;
				return this;
			}
			public SnsActionGroup.Builder ClearCurrentAction()
			{
				this.PrepareBuilder();
				this.result.hasCurrentAction = false;
				this.result.currentAction_ = null;
				return this;
			}
			public SnsActionGroup.Builder SetReferAction(SnsAction value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasReferAction = true;
				this.result.referAction_ = value;
				return this;
			}
			public SnsActionGroup.Builder SetReferAction(SnsAction.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasReferAction = true;
				this.result.referAction_ = builderForValue.Build();
				return this;
			}
			public SnsActionGroup.Builder MergeReferAction(SnsAction value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasReferAction && this.result.referAction_ != SnsAction.DefaultInstance)
				{
					this.result.referAction_ = SnsAction.CreateBuilder(this.result.referAction_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.referAction_ = value;
				}
				this.result.hasReferAction = true;
				return this;
			}
			public SnsActionGroup.Builder ClearReferAction()
			{
				this.PrepareBuilder();
				this.result.hasReferAction = false;
				this.result.referAction_ = null;
				return this;
			}
		}
		public const int IdFieldNumber = 1;
		public const int ParentIdFieldNumber = 2;
		public const int CurrentActionFieldNumber = 3;
		public const int ReferActionFieldNumber = 4;
		private static readonly SnsActionGroup defaultInstance;
		private static readonly string[] _snsActionGroupFieldNames;
		private static readonly uint[] _snsActionGroupFieldTags;
		private bool hasId;
		private ulong id_;
		private bool hasParentId;
		private ulong parentId_;
		private bool hasCurrentAction;
		private SnsAction currentAction_;
		private bool hasReferAction;
		private SnsAction referAction_;
		private int memoizedSerializedSize = -1;
		public static SnsActionGroup DefaultInstance
		{
			get
			{
				return SnsActionGroup.defaultInstance;
			}
		}
		public override SnsActionGroup DefaultInstanceForType
		{
			get
			{
				return SnsActionGroup.DefaultInstance;
			}
		}
		protected override SnsActionGroup ThisMessage
		{
			get
			{
				return this;
			}
		}
		public ulong Id
		{
			get
			{
				return this.id_;
			}
		}
		public ulong ParentId
		{
			get
			{
				return this.parentId_;
			}
		}
		public SnsAction CurrentAction
		{
			get
			{
				return this.currentAction_ ?? SnsAction.DefaultInstance;
			}
		}
		public SnsAction ReferAction
		{
			get
			{
				return this.referAction_ ?? SnsAction.DefaultInstance;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasId && this.hasCurrentAction && this.CurrentAction.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasId)
				{
					num += CodedOutputStream.ComputeUInt64Size(1, this.Id);
				}
				if (this.hasParentId)
				{
					num += CodedOutputStream.ComputeUInt64Size(2, this.ParentId);
				}
				if (this.hasCurrentAction)
				{
					num += CodedOutputStream.ComputeMessageSize(3, this.CurrentAction);
				}
				if (this.hasReferAction)
				{
					num += CodedOutputStream.ComputeMessageSize(4, this.ReferAction);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsActionGroup()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsActionGroupFieldNames = SnsActionGroup._snsActionGroupFieldNames;
			if (this.hasId)
			{
				output.WriteUInt64(1, snsActionGroupFieldNames[1], this.Id);
			}
			if (this.hasParentId)
			{
				output.WriteUInt64(2, snsActionGroupFieldNames[2], this.ParentId);
			}
			if (this.hasCurrentAction)
			{
				output.WriteMessage(3, snsActionGroupFieldNames[0], this.CurrentAction);
			}
			if (this.hasReferAction)
			{
				output.WriteMessage(4, snsActionGroupFieldNames[3], this.ReferAction);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasId)
			{
				num ^= this.id_.GetHashCode();
			}
			if (this.hasParentId)
			{
				num ^= this.parentId_.GetHashCode();
			}
			if (this.hasCurrentAction)
			{
				num ^= this.currentAction_.GetHashCode();
			}
			if (this.hasReferAction)
			{
				num ^= this.referAction_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsActionGroup snsActionGroup = value as SnsActionGroup;
			return snsActionGroup != null && (this.hasId == snsActionGroup.hasId && (!this.hasId || this.id_.Equals(snsActionGroup.id_))) && (this.hasParentId == snsActionGroup.hasParentId && (!this.hasParentId || this.parentId_.Equals(snsActionGroup.parentId_))) && (this.hasCurrentAction == snsActionGroup.hasCurrentAction && (!this.hasCurrentAction || this.currentAction_.Equals(snsActionGroup.currentAction_))) && (this.hasReferAction == snsActionGroup.hasReferAction && (!this.hasReferAction || this.referAction_.Equals(snsActionGroup.referAction_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsActionGroup, SnsActionGroup.Builder>.PrintField("Id", this.hasId, this.id_, writer);
			GeneratedMessageLite<SnsActionGroup, SnsActionGroup.Builder>.PrintField("ParentId", this.hasParentId, this.parentId_, writer);
			GeneratedMessageLite<SnsActionGroup, SnsActionGroup.Builder>.PrintField("CurrentAction", this.hasCurrentAction, this.currentAction_, writer);
			GeneratedMessageLite<SnsActionGroup, SnsActionGroup.Builder>.PrintField("ReferAction", this.hasReferAction, this.referAction_, writer);
		}
		public static SnsActionGroup ParseFrom(byte[] data)
		{
			return SnsActionGroup.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsActionGroup MakeReadOnly()
		{
			return this;
		}
		public static SnsActionGroup.Builder CreateBuilder()
		{
			return new SnsActionGroup.Builder();
		}
		public override SnsActionGroup.Builder ToBuilder()
		{
			return SnsActionGroup.CreateBuilder(this);
		}
		public override SnsActionGroup.Builder CreateBuilderForType()
		{
			return new SnsActionGroup.Builder();
		}
		public static SnsActionGroup.Builder CreateBuilder(SnsActionGroup prototype)
		{
			return new SnsActionGroup.Builder(prototype);
		}
		static SnsActionGroup()
		{
			SnsActionGroup.defaultInstance = new SnsActionGroup().MakeReadOnly();
			SnsActionGroup._snsActionGroupFieldNames = new string[]
			{
				"CurrentAction",
				"Id",
				"ParentId",
				"ReferAction"
			};
			SnsActionGroup._snsActionGroupFieldTags = new uint[]
			{
				26u,
				8u,
				16u,
				34u
			};
			object.ReferenceEquals(micromsg.Proto.SnsActionGroup.Descriptor, null);
		}
	}
}
